package com.doubi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doubi.entity.Tagtable;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface TagtableMapper extends BaseMapper<Tagtable> {
    //查询此标签是否存在
    @Select("select COUNT(*) from tagtable where tagContent=#{tagContent}")
    Integer iftagContent(@Param("tagContent") String tagContent);
    //修改标签次数
    @Update("update tagtable set tagnum=#{tagnum} where tid=#{tid}")
    Integer updateTagNum(@Param("tagnum") String tagnum, @Param("tid") Integer tid);
}
